package me.ereach.hashtable;

import java.util.Enumeration;
import java.util.Hashtable;

public class Main {
    public static void main(String[] args) {
        Hashtable balance = new Hashtable();

        balance.put("Tom", 1000);
        balance.put("Jerry", 1200);
        balance.put("Cherry", 1600);
        balance.put("Wendy", 1500);

        Enumeration<String> names = balance.keys();

        while (names.hasMoreElements()) {
            String nm = names.nextElement();
            System.out.println(nm + "'s balance is " + balance.get(nm));
        }
    }
}
